{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1、导包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import lightgbm as lgbm\n",
    "from lightgbm.sklearn import LGBMClassifier\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "import matplotlib.pyplot as plt \n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2、读取数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>feat_1</th>\n",
       "      <th>feat_2</th>\n",
       "      <th>feat_3</th>\n",
       "      <th>feat_4</th>\n",
       "      <th>feat_5</th>\n",
       "      <th>feat_6</th>\n",
       "      <th>feat_7</th>\n",
       "      <th>feat_8</th>\n",
       "      <th>feat_9</th>\n",
       "      <th>...</th>\n",
       "      <th>feat_84_tfidf</th>\n",
       "      <th>feat_85_tfidf</th>\n",
       "      <th>feat_86_tfidf</th>\n",
       "      <th>feat_87_tfidf</th>\n",
       "      <th>feat_88_tfidf</th>\n",
       "      <th>feat_89_tfidf</th>\n",
       "      <th>feat_90_tfidf</th>\n",
       "      <th>feat_91_tfidf</th>\n",
       "      <th>feat_92_tfidf</th>\n",
       "      <th>feat_93_tfidf</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0.016393</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.075886</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.013158</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.013158</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>0.016393</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.014286</td>\n",
       "      <td>0.315789</td>\n",
       "      <td>0.1</td>\n",
       "      <td>0.131579</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.460983</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.008244</td>\n",
       "      <td>0.022456</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.124622</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.145988</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 188 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   id    feat_1  feat_2  feat_3    feat_4    feat_5  feat_6    feat_7  \\\n",
       "0   1  0.016393     0.0     0.0  0.000000  0.000000     0.0  0.000000   \n",
       "1   2  0.000000     0.0     0.0  0.000000  0.000000     0.0  0.000000   \n",
       "2   3  0.000000     0.0     0.0  0.000000  0.000000     0.0  0.000000   \n",
       "3   4  0.016393     0.0     0.0  0.014286  0.315789     0.1  0.131579   \n",
       "4   5  0.000000     0.0     0.0  0.000000  0.000000     0.0  0.000000   \n",
       "\n",
       "     feat_8  feat_9      ...        feat_84_tfidf  feat_85_tfidf  \\\n",
       "0  0.000000     0.0      ...             0.000000       0.075886   \n",
       "1  0.013158     0.0      ...             0.000000       0.000000   \n",
       "2  0.013158     0.0      ...             0.000000       0.000000   \n",
       "3  0.000000     0.0      ...             0.460983       0.000000   \n",
       "4  0.000000     0.0      ...             0.000000       0.124622   \n",
       "\n",
       "   feat_86_tfidf  feat_87_tfidf  feat_88_tfidf  feat_89_tfidf  feat_90_tfidf  \\\n",
       "0       0.000000       0.000000            0.0            0.0       0.000000   \n",
       "1       0.000000       0.000000            0.0            0.0       0.000000   \n",
       "2       0.000000       0.000000            0.0            0.0       0.000000   \n",
       "3       0.008244       0.022456            0.0            0.0       0.000000   \n",
       "4       0.000000       0.000000            0.0            0.0       0.145988   \n",
       "\n",
       "   feat_91_tfidf  feat_92_tfidf  feat_93_tfidf  \n",
       "0            0.0            0.0            0.0  \n",
       "1            0.0            0.0            0.0  \n",
       "2            0.0            0.0            0.0  \n",
       "3            0.0            0.0            0.0  \n",
       "4            0.0            0.0            0.0  \n",
       "\n",
       "[5 rows x 188 columns]"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dpath = './data/'\n",
    "train1 = pd.read_csv(dpath + 'Otto_FE_train_org.csv')\n",
    "train2 = pd.read_csv(dpath + 'Otto_FE_train_tfidf.csv')\n",
    "\n",
    "train2 = train2.drop(['id','target'],axis=1)\n",
    "train = pd.concat([train1,train2],axis=1,ignore_index=False)\n",
    "train.head()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "del train1\n",
    "del train2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "3、准备数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train = train['target']\n",
    "y_train = y_train.map(lambda s: s[6])\n",
    "y_train = y_train.map(lambda s: int(s)-1) #0-8\n",
    "X_train = train.drop(['id','target'],axis=1)\n",
    "feat_names = X_train.columns\n",
    "\n",
    "from scipy.sparse import csr_matrix\n",
    "X_train = csr_matrix(X_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4、超参数调优\n",
    "\n",
    "1、树的数目n_estimators 和 学习率 learning_rate\n",
    "2、树的最大深度max_depth 和 树的最大叶子节点数目num_leaves（注意：XGBoost只有max_depth，LightGBM采用叶子优先的方式生成树，num_leaves很重要，设置成比 2^max_depth 小）\n",
    "3、叶子结点的最小样本数:min_data_in_leaf(min_data, min_child_samples)\n",
    "4、每棵树的列采样比例：feature_fraction/colsample_bytree\n",
    "5、每棵树的行采样比例：bagging_fraction （需同时设置bagging_freq=1）/subsample\n",
    "6、正则化参数lambda_l1(reg_alpha), lambda_l2(reg_lambda)\n",
    "7、两个非模型复杂度参数，但会影响模型速度和精度。可根据特征取值范围和样本数目修改这两个参数 1）特征的最大bin数目max_bin：默认255； 2）用来建立直方图的样本数目subsample_for_bin：默认200000。\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "MAX_ROUNDS = 10000"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import StratifiedKFold\n",
    "kfold = StratifiedKFold(n_splits=3,shuffle=True,random_state=3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.1、n_estimators 调优"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_n_estimators(params,X_train,y_train,early_stopping_rounds=10):\n",
    "    lgbm_params = params.copy()\n",
    "    lgbm_params['num_class'] =9\n",
    "    lgbmtrain = lgbm.Dataset(X_train,y_train)\n",
    "    \n",
    "    cvresult = lgbm.cv(lgbm_params,lgbmtrain,num_boost_round=MAX_ROUNDS,nfold=3,metrics='multi_logloss',\n",
    "                      early_stopping_rounds=early_stopping_rounds,seed=3)\n",
    "    print('best_n_estimators:' ,len(cvresult['multi_logloss-mean']))\n",
    "    print('best cv score:',cvresult['multi_logloss-mean'][-1])\n",
    "    \n",
    "    return len(cvresult['multi_logloss-mean'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best_n_estimators: 324\n",
      "best cv score: 0.4888421204435865\n"
     ]
    }
   ],
   "source": [
    "params = {\n",
    "        'boosting_type': 'goss',\n",
    "        'objective': 'multiclass',\n",
    "        'n_jobs': 30,\n",
    "        'learning_rate': 0.1,\n",
    "        'num_leaves': 60,\n",
    "        'max_depth': 6,\n",
    "        'max_bin': 127, #2^6,原始特征为整数，很少超过100\n",
    "        #'subsample': 0.7,\n",
    "        #'bagging_freq': 1,\n",
    "        'colsample_bytree': 0.7,\n",
    "        }\n",
    "n_estimators_1 = get_n_estimators(params,X_train,y_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.2、num_leaves & max_depth"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 20 candidates, totalling 60 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.\n",
      "[Parallel(n_jobs=4)]: Done  10 tasks      | elapsed:   48.6s\n",
      "[Parallel(n_jobs=4)]: Done  60 out of  60 | elapsed:  5.7min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=3, shuffle=True),\n",
       "       error_score='raise-deprecating',\n",
       "       estimator=LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=0.7,\n",
       "        importance_type='split', learning_rate=0.1, max_bin=127,\n",
       "        max_depth=-1, min_child_samples=20, min_child_weight=0.001,\n",
       "        min_split_gain=0.0, n_estimators=324, n_jobs=8, num_class=9,\n",
       "        num_leaves=31, objective='multiclass', random_state=None,\n",
       "        reg_alpha=0.0, reg_lambda=0.0, silent=False, subsample=1.0,\n",
       "        subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid='warn', n_jobs=4,\n",
       "       param_grid={'num_leaves': range(40, 90, 10), 'max_depth': range(5, 9)},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {\n",
    "        'boosting_type': 'goss',\n",
    "        'objective': 'multiclass',\n",
    "        'n_jobs': 8,\n",
    "        'learning_rate': 0.1,\n",
    "        'n_estimators': n_estimators_1,\n",
    "        #'num_leaves': 60,\n",
    "        #'max_depth': 6,\n",
    "        'max_bin': 127, #2^6,原始特征为整数，很少超过100\n",
    "        #'subsample': 0.7,\n",
    "        'colsample_bytree': 0.7,\n",
    "        'num_class':9\n",
    "        }\n",
    "lgbm_c = LGBMClassifier(silent=False,**params)\n",
    "num_leaves_s = range(40,90,10)#50,60,70,80,\n",
    "max_depth_s = range(5,9,1)#5,6,7,8\n",
    "tuned_params = dict(num_leaves=num_leaves_s,max_depth=max_depth_s)\n",
    "grid_search = GridSearchCV(lgbm_c,n_jobs=4,param_grid=tuned_params,cv=kfold,scoring='neg_log_loss',verbose=5,refit=False)\n",
    "grid_search.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best score: 0.4884178968468419\n",
      "best params: {'max_depth': 6, 'num_leaves': 50}\n"
     ]
    }
   ],
   "source": [
    "print('best score:',-grid_search.best_score_)\n",
    "print('best params:',grid_search.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAELCAYAAADz6wBxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzs3Xl4VOX5//H3nRVCwpYAgYQQRFkUECWAG4sLAlZRWhew9df6bcW61GqlVaqtxX1FXFBrFa1UC6JFcUVcIAqyBGSN7GsCIQsQIAlJJnP//jiTYRJDEpJMJsv9uq5cMjPnzNwnYD55lvM8oqoYY4wxNRUU6AKMMcY0bhYkxhhjasWCxBhjTK1YkBhjjKkVCxJjjDG1YkFijDGmVixIjDHG1IoFiTHGmFqxIDHGGFMrIYEuoD7ExMRoYmJioMswxphGZeXKldmq2qGq4/waJCIyGngOCAZeU9XHT3Dc1cAcYJCqpohIGPBPIAlwA39U1YWeY8OAF4ERntfuU9X3K6sjMTGRlJSUOrkmY4xpLkRkV3WO81uQiEgwMB0YCaQBK0RknqqmljsuCrgDWObz9E0AqtpPRDoCn4nIIFV1A/cBmaraU0SCgPb+ugZjjDFV8+cYyWBgq6puV9UiYBZwZQXHPQQ8CRzzee504CsAVc0EDuG0TgD+D3jM85pbVbP9U74xxpjq8GeQxAF7fB6neZ7zEpGzgK6q+nG5c9cAV4pIiIh0BwYCXUWkref1h0RklYjMEZFOfqrfGGNMNfgzSKSC57xr1nu6pZ4F7q7guBk4wZMCTAOWAC6crrh4YLGqng18Dzxd4YeLT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f+TURSlXvTGGNMjQT5881FZLSIbBKRrSJybyXHXS0iKiJJnsdhIvKGiKwTkTUiMsLn2M89z20QkVdEJNif19DYuLKy2HPTRDKffJKoEcM5Ze7/LERMo3bo0CFeeumlGp07bdo08vPz67iiujFixAhqunPrBx98QGpqapXvtXPnTlq2bMmAAQMYMGAAv//972tcb2X8FiSeH/DTgTHA6cAEETm9guOigDuAZT5P3wSgqv2AkcAzIlJa67WqeibQF+gAXOOva2hsjn77HduvGkd+Sgqx/3iAuOefJ7ht20CXZUytNNUgqY3yQVKZHj16sHr1alavXs0rr7zil3r82bU1GNiqqtsBRGQWcCVQ/uofAp4EJvk8dzrwFYCqZorIISAJWK6qh31qDwOa/qbzVdCiIjKnPceBGTMIP+00urwxgxY97d4QU7emfLSB1L2Hqz7wJJzepTUPXHFGpcfce++9bNu2jQEDBjBy5Eg6duzIu+++S2FhIePGjWPKlCnk5eVx7bXXkpaWRklJCX/729/Yv38/e/fu5cILLyQmJoZvvvmmwvePjIzktttu48svv6Rdu3Y8+uij/OUvf2H37t1MmzaNsWPHsnPnTm644Qby8vIAePHFFznvvPOYO3cu06dPZ8GCBWRkZDB8+HCSk5OJjY39yecUFBRw4403kpqaSp8+fSgoKPC+9sUXX/DAAw9QWFhIjx49eOONN4iMjCQxMZHrrrvOW/s777xDZmYm8+bNY9GiRTz88MO8//77AMyZM4dbb72VQ4cO8frrrzN06NAa/Z3UhD+7tuKAPT6P0zzPeYnIWUBXVf243LlrgCtFJEREugMDga4+580HMoEjwHt+qL3RKNq5k50TrufAjBm0u34CiXPetRAxTcrjjz/u/a165MiRbNmyheXLl7N69WpWrlxJcnIyn3/+OV26dGHNmjWsX7+e0aNHc8cdd9ClSxe++eabE4YIQF5eHiNGjGDlypVERUVx//33s2DBAubOncvf//53ADp27MiCBQtYtWoVs2fP5o477gBg3LhxxMbGMn36dG666SamTJlSYYgAvPzyy0RERLB27Vruu+8+Vq5cCUB2djYPP/wwX375JatWrSIpKYmpU6d6z2vdujXLly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mOpJ9KOrWOObb2PUPSBZLukHSXykXGLpT0hdpB95eSFkzzeZdL+lntVryhq/3NxyX9WtKopB/V1hdHqVy46xV1zFxJT0k6XNISSffW4zwiaWkdc1690NGopIcPSvLikJZCEjHWCcCVtk8C9gDn9hi/DPgIpUHfJcDzLh10fwF8tNeTSToc+C6wyvZy4Lp6HIDbbZ9mu3OhqbW291Lav7ytjvkAsMGlSd/3gM/U43wRuKqOuRh4Tz3Oyl4xRfyvZvUeEnFI2e4DV5vcBCzqMf4h288Bz0naC9xV928B3jiN5zuRUozuL332OIzSghxgmaRvAkcD84ENdf8twIcozfhWA1dJmk/p9HprPQ6UPksAjwLXS/ohpSNsxIxKIYkY64Wux/uAOcBLHDh7P2KK8fu7tvczvfeXgG22z5jgZ9cD59gelXQBpWknlIaA36pLZ8spDTznUS5gNDL+ILY/KenNlKtsbpY0YvvZacQWMS1Z2oro7QnKhA0H2nHPlMeBV0s6A8pSl6ST6s+OBHbW5a81nV+w/S9KN9d1lG7Q+2z/E9gu6bx6HEk6uT5eYnuj7YuBvwOvn+F/QxziUkgiersM+JSknwPHzuSBbb9IKU6XShoFNlOWqAC+DmwE7qe0Bu92C3B+ve9YA6ytx9lGuVoewLclbZG0FXiY8hlLxIxJG/mIiOhLzkgiIqIv+bA94iCSdCWwYtzudbbXt4gn4mDI0lZERPQlS1sREdGXFJKIiOhLCklERPQlhSQiIvqSQhIREX35L8P+aUqJjHtNAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "test_means = grid_search.cv_results_['mean_test_score']\n",
    "test_scores = np.array(test_means).reshape(len(max_depth_s),len(num_leaves_s))\n",
    "for i,value in enumerate(max_depth_s):\n",
    "    plt.plot(num_leaves_s,-test_scores[i],label='test_max_depth' + str(value))\n",
    "    \n",
    "plt.legend()\n",
    "plt.xlabel('num_leaves')\n",
    "plt.ylabel('Log loss')\n",
    "#plt.show()\n",
    "plt.savefig('max_depth_and_num_leaves_1.png')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-0.49461238, -0.49461238, -0.49461238, -0.49461238, -0.49461238,\n",
       "       -0.48879783, -0.4884179 , -0.49019542, -0.48925765, -0.48925765,\n",
       "       -0.49072947, -0.48954905, -0.49037918, -0.48976653, -0.48893101,\n",
       "       -0.49187738, -0.49394049, -0.49434256, -0.49408929, -0.49579563])"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_means"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 9 candidates, totalling 27 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.\n",
      "[Parallel(n_jobs=4)]: Done  10 tasks      | elapsed:   53.1s\n",
      "[Parallel(n_jobs=4)]: Done  27 out of  27 | elapsed:  2.4min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=3, shuffle=True),\n",
       "       error_score='raise-deprecating',\n",
       "       estimator=LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=0.7,\n",
       "        importance_type='split', learning_rate=0.1, max_bin=127,\n",
       "        max_depth=-1, min_child_samples=20, min_child_weight=0.001,\n",
       "        min_split_gain=0.0, n_estimators=324, n_jobs=8, num_class=9,\n",
       "        num_leaves=31, objective='multiclass', random_state=None,\n",
       "        reg_alpha=0.0, reg_lambda=0.0, silent=False, subsample=1.0,\n",
       "        subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid='warn', n_jobs=4,\n",
       "       param_grid={'num_leaves': range(40, 70, 10), 'max_depth': range(5, 8)},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {\n",
    "        'boosting_type': 'goss',\n",
    "        'objective': 'multiclass',\n",
    "        'n_jobs': 8,\n",
    "        'learning_rate': 0.1,\n",
    "        'n_estimators': n_estimators_1,\n",
    "        #'num_leaves': 60,\n",
    "        #'max_depth': 6,\n",
    "        'max_bin': 127, #2^6,原始特征为整数，很少超过100\n",
    "        #'subsample': 0.7,\n",
    "        'colsample_bytree': 0.7,\n",
    "        'num_class':9\n",
    "        }\n",
    "lgbm_c = LGBMClassifier(silent=False,**params)\n",
    "num_leaves_s = range(40,70,10)#40,50,60,\n",
    "max_depth_s = range(5,8,1)#5,6,7,\n",
    "tuned_params = dict(num_leaves=num_leaves_s,max_depth=max_depth_s)\n",
    "grid_search = GridSearchCV(lgbm_c,n_jobs=4,param_grid=tuned_params,cv=kfold,scoring='neg_log_loss',verbose=5,refit=False)\n",
    "grid_search.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best score: 0.4884178968468419\n",
      "best params: {'max_depth': 6, 'num_leaves': 50}\n"
     ]
    }
   ],
   "source": [
    "print('best score:',-grid_search.best_score_)\n",
    "print('best params:',grid_search.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAELCAYAAADz6wBxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJ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yAHV1dbzxxhvceeed3HLLLdH93333XebOnctZZ53FK6+8ktg3oxXx3EfSOJy/BLjP3cssviH+McCWmMeVwClNDmw2Fxjn7k+Z2Q0xT5UB55vZI8A4YF74+Y2YffOATwI/i6MuIpKg9loO3eG5557jueeeY+7cuQDs37+f8vJyzjjjDG644Qa+/e1v84lPfKJD/41nZWWxePFiAGbNmkV2djaZmZnMmjWLTZs2AcGNmddeey2lpaWkp6ezfv366P6/+MUvOPHEEzn11FO57LLLWn2dl19+ORpAs2fPZvbs2QC89tprrFu3jo985CMA1NbWctppp0X3azzmZZddxvXXX9/q8T/1qU8BMG/evGi9R48ezebNmykoKGDlypVccMEFrF27liFDhsR9fuIRT5CsNLPngInATWFXVEMc+7UUNh590iwNuAP4fAvl7gWmAyXAe8CrQF3MvhnAw8DP3X1jiy9udg1wDcD48ePjqK6I9HTuzk033cSXv/zlDz23cuVKnn76aW666SY+9rGPRVsT7cnMzIxe/pqWlkZ2dnb067q64M/OHXfcwciRIykrK6OhoYEBAwZE93///fdJS0ujqqqKhoYG0tJa7+hp6X9wd2fhwoU8/PDD7e7T1v/wjfVOT0+P1js7Ozu6fd68eUyePJn169cTiURaPU5nxNO19UXgRmC+ux8EMgm6t9pTSdCKaDQW2BrzOBc4EVhuZpuAU4GlZhZx9zp3v97di939fCAPKI/Z9x6g3N3vbO3F3f0ed4+4e6SwsDCO6opIT5Sbm8u+ffsAWLRoEffeey/79+8Hgj/i27dvZ+vWreTk5HDFFVdwww038Oabb35o30TU1NQwevRo0tLSeOCBB6ivrweC7qSrrrqKhx56iOnTpzfpkmruzDPP5MEHHwRgzZo1rFq1CoBTTz2Vv/71r1RUVABw8ODBJi2eRx99NPq5saUS7/vasWNHtK4bN26kvLycSZMmdfTttyueFslpQKm7HzCzK4CTiK87aQVQZGYTgfeBS4HLG5909xpgeONjM1sO3ODuJWaWA1j4mguBusZBejO7DRgKfCmeNygivVtBQQEf+chHOPHEEzn33HO5/PLLo39QBw8ezO9+9zsqKir45je/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CRELRIREUmIBttFksjM7iJYWz7Wz9z9vlTURyQZ1LUlIiIJUdeWiIgkREEiIiIJUZCIiEhCFCQiIpIQBYmIiCTk/wEA5Jy07achuwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "test_means = grid_search.cv_results_['mean_test_score']\n",
    "test_scores = np.array(test_means).reshape(len(max_depth_s),len(num_leaves_s))\n",
    "for i,value in enumerate(max_depth_s):\n",
    "    plt.plot(num_leaves_s,-test_scores[i],label='test_max_depth' + str(value))\n",
    "    \n",
    "plt.legend()\n",
    "plt.xlabel('num_leaves')\n",
    "plt.ylabel('Log loss')\n",
    "#plt.show()\n",
    "plt.savefig('max_depth_and_num_leaves_2.png')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-0.49461238, -0.49461238, -0.49461238, -0.48879783, -0.4884179 ,\n",
       "       -0.49019542, -0.49072947, -0.48954905, -0.49037918])"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_means"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "max_depth=6,num_leaves=50"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.2、调优min_child_samples"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 4 candidates, totalling 12 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.\n",
      "[Parallel(n_jobs=4)]: Done   8 out of  12 | elapsed:   43.4s remaining:   21.7s\n",
      "[Parallel(n_jobs=4)]: Done  12 out of  12 | elapsed:  1.0min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=3, shuffle=True),\n",
       "       error_score='raise-deprecating',\n",
       "       estimator=LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=0.7,\n",
       "        importance_type='split', learning_rate=0.1, max_bin=127,\n",
       "        max_depth=6, min_child_samples=20, min_child_weight=0.001,\n",
       "        min_split_gain=0.0, n_estimators=324, n_jobs=8, num_class=9,\n",
       "        num_leaves=50, objective='multiclass', random_state=None,\n",
       "        reg_alpha=0.0, reg_lambda=0.0, silent=False, subsample=1.0,\n",
       "        subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid='warn', n_jobs=4,\n",
       "       param_grid={'min_child_samples': range(10, 50, 10)},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {\n",
    "        'boosting_type': 'goss',\n",
    "        'objective': 'multiclass',\n",
    "        'n_jobs': 8,\n",
    "        'learning_rate': 0.1,\n",
    "        'n_estimators': n_estimators_1,\n",
    "        'num_leaves': 50,\n",
    "        'max_depth': 6,\n",
    "        'max_bin': 127, #2^6,原始特征为整数，很少超过100\n",
    "        #'subsample': 0.7,\n",
    "       #'bagging_freq': 1,\n",
    "        'colsample_bytree': 0.7,\n",
    "        'num_class':9\n",
    "        }\n",
    "lgbm_c = LGBMClassifier(silent=False,**params)\n",
    "\n",
    "min_child_samples_s = range(10,50,10)#10.20,30,40\n",
    "tuned_params = dict(min_child_samples=min_child_samples_s)\n",
    "\n",
    "grid_search = GridSearchCV(lgbm_c,n_jobs=4,param_grid=tuned_params,cv=kfold,scoring='neg_log_loss',verbose=5,refit=False)\n",
    "grid_search.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best score: 0.4881403108235829\n",
      "best params: {'min_child_samples': 30}\n"
     ]
    }
   ],
   "source": [
    "print('best score:',-grid_search.best_score_)\n",
    "print('best params:',grid_search.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAGwpJREFUeJzt3Xl81fWd7/HXJwuEfUtYJECAJChuqHEporKFYnWq7VintE51tEXcETrT9t77uHemc+8ffdwrqIMbWkQ7rdZOHcc6dTRsgohLcKEgko0AYUvYCZCQ5Xv/yEFizHKSnOR7zu+8nw/yIOf3+57ze3/5wZtvficnx5xziIhIsCT4DiAiIpGnchcRCSCVu4hIAKncRUQCSOUuIhJAKncRkQBSuYuIBJDKXUQkgFTuIiIBlOTrwKmpqS4jI8PX4UVEYtLGjRsPOOfS2hrnrdwzMjLIz8/3dXgRkZhkZjvCGafLMiIiAaRyFxEJIJW7iEgAqdxFRAJI5S4iEkAqdxGRAGqz3M1smZmVm9nmNsZdbmZ1ZnZL5OKJiEhHhLNyXw7Mbm2AmSUCvwLeikCmVu04eIJ/+tMWaurqu/pQIiIxq81yd86tBQ61MewB4I9AeSRCtaa4opLn15fyx41lXX0oEZGY1elr7mY2EvgO8HTn47Rt2oShTBo1kMdXFlJdW9cdhxQRiTmReEL1UeBnzrk2m9bM5ppZvpnlV1RUdOhgZsZPZ01gz9Eqfv/Rrg49hohI0EWi3HOAl82sFLgFeNLMbm5uoHNuqXMuxzmXk5bW5s+9adHVmUO4YuxglqwqoqpGq3cRkaY6Xe7OubHOuQznXAbwb8C9zrnXOp2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HtLj8nUV/uzrm1wKEmm28CXgh9/gJwc7eG6qAW5hJznHN7nXMfhz4/TsNf2pHE4HlpZS4xxzWoDN1MDn04YDrwb6HtUX9eWplHTDKzdOAG4LnQbaMbzknUl3sLhjnn9kLDP05gqOc8nXW/mW0KXbaJ+ksZjZlZBnAJ8AExfl6azAVi8LyEvvz/FCgH8oBi4IhzrjY0pIwY+M+r6Tycc2fOyf8JnZPFZtbTY8T2eBT4B6A+dHsI3XBOYrXcg+QpYDwNX37uBR7xGyd8ZtYX+CMw3zl3zHeezmhmLjF5Xpxzdc65SUA6cAVwXnPDujdV+zWdh5ldAPwCOBe4HBgM/MxjxLCY2Y1AuXNuY+PNzQyN+DmJ1XLfb2YjAEK/l3vO02HOuf2hv8j1wLM0/IOMemaWTEMZ/tY592poc0yel+bmEqvn5Qzn3BFgDQ3PIww0s6TQrnRgj69c7dVoHrNDl9Ccc64aeJ7YOCdXA982s1LgZRouxzxKN5yTWC3314HbQ5/fDvyHxyydcqYMQ74DbG5pbLQIXTP8NbDVObeo0a6YOy8tzSVGz0uamQ0Mfd4LmEnDcwirgVtCw6L+vLQwjy8aLRyMhmvUUX9OnHO/cM6lO+cygO8Dq5xzP6QbzknUv4jJzF4CptLwU9T2A/8LeA14BRgN7AS+55yL+icqW5jLVBq+9HdAKXD3mevW0crMpgDrgL9w9jrif6PhWnVMnZdW5jKH2DsvF9Hw5FwiDQu3V5xzvzSzcTSsGgcDnwC3hVa/UamVeawC0mi4rPEpMK/RE69Rz8ymAj91zt3YHeck6stdRETaL1Yvy4iISCtU7iIiAaRyFxEJIJW7iEgAqdxFRAJI5S4iEkAqdxGRAFK5i4gE0P8H/0O9TBwwDmwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "test_means = grid_search.cv_results_[ 'mean_test_score' ]\n",
    "plt.plot(min_child_samples_s, -test_means)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-1.4085845 , -0.4884179 , -0.48814031, -0.49042776])"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_means"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "min_child_samples=30"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.3、行采样参数 sub_samples/bagging_fraction"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 5 candidates, totalling 15 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.\n",
      "[Parallel(n_jobs=4)]: Done  12 out of  15 | elapsed:   59.3s remaining:   14.8s\n",
      "[Parallel(n_jobs=4)]: Done  15 out of  15 | elapsed:  1.3min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=3, shuffle=True),\n",
       "       error_score='raise-deprecating',\n",
       "       estimator=LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=0.7,\n",
       "        importance_type='split', learning_rate=0.1, max_bin=127,\n",
       "        max_depth=6, min_child_samples=30, min_child_weight=0.001,\n",
       "        min_split_gain=0.0, n_estimators=324, n_jobs=8, num_class=9,\n",
       "        num_leaves=50, objective='multiclass', random_state=None,\n",
       "        reg_alpha=0.0, reg_lambda=0.0, silent=False, subsample=1.0,\n",
       "        subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid='warn', n_jobs=4,\n",
       "       param_grid={'subsample': [0.5, 0.6, 0.7, 0.8, 0.9]},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {\n",
    "        'boosting_type': 'goss',\n",
    "        'objective': 'multiclass',\n",
    "        'n_jobs': 8,\n",
    "        'learning_rate': 0.1,\n",
    "        'n_estimators': n_estimators_1,\n",
    "        'max_depth': 6,\n",
    "        'num_leaves': 50,\n",
    "        'min_child_samples':30,\n",
    "        'max_bin': 127, #2^6,原始特征为整数，很少超过100\n",
    "        #'subsample': 0.7,\n",
    "        #'bagging_freq': 1,\n",
    "        'colsample_bytree': 0.7,\n",
    "        'num_class':9\n",
    "        \n",
    "        }\n",
    "lgbm_c = LGBMClassifier(silent=False,**params)\n",
    "\n",
    "subsample_s = [i/10.0 for i in range(5,10)]#0.5,0.6,0.7,0.8,0.9\n",
    "tuned_params = dict(subsample=subsample_s)\n",
    "\n",
    "grid_search = GridSearchCV(lgbm_c,n_jobs=4,param_grid=tuned_params,cv=kfold,scoring='neg_log_loss',verbose=5,refit=False)\n",
    "grid_search.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best score: 0.4881403108235829\n",
      "best params: {'subsample': 0.5}\n"
     ]
    }
   ],
   "source": [
    "print('best score:',-grid_search.best_score_)\n",
    "print('best params:',grid_search.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAD7ZJREFUeJzt3WuMXHd9xvHvE7uBAqEEvEgQO6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TkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "test_means = grid_search.cv_results_[ 'mean_test_score' ]\n",
    "plt.plot(subsample_s, -test_means)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-0.48814031, -0.48814031, -0.48814031, -0.48814031, -0.48814031])"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_means"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "貌似不支持subsample调优"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.5、列采样参数 sub_feature/feature_fraction/colsample_bytree"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 3 folds for each of 5 candidates, totalling 15 fits\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.\n",
      "[Parallel(n_jobs=4)]: Done  12 out of  15 | elapsed:   59.6s remaining:   14.9s\n",
      "[Parallel(n_jobs=4)]: Done  15 out of  15 | elapsed:  1.3min finished\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=StratifiedKFold(n_splits=3, random_state=3, shuffle=True),\n",
       "       error_score='raise-deprecating',\n",
       "       estimator=LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=1.0,\n",
       "        importance_type='split', learning_rate=0.1, max_bin=127,\n",
       "        max_depth=6, min_child_samples=30, min_child_weight=0.001,\n",
       "        min_split_gain=0.0, n_estimators=324, n_jobs=8, num_class=9,\n",
       "        num_leaves=50, objective='multiclass', random_state=None,\n",
       "        reg_alpha=0.0, reg_lambda=0.0, silent=False, subsample=1.0,\n",
       "        subsample_for_bin=200000, subsample_freq=0),\n",
       "       fit_params=None, iid='warn', n_jobs=4,\n",
       "       param_grid={'colsample_bytree': [0.5, 0.6, 0.7, 0.8, 0.9]},\n",
       "       pre_dispatch='2*n_jobs', refit=False, return_train_score='warn',\n",
       "       scoring='neg_log_loss', verbose=5)"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {\n",
    "        'boosting_type': 'goss',\n",
    "        'objective': 'multiclass',\n",
    "        'n_jobs': 8,\n",
    "        'learning_rate': 0.1,\n",
    "        'n_estimators': n_estimators_1,\n",
    "        'max_depth': 6,\n",
    "        'num_leaves': 50,\n",
    "        'min_child_samples':30,\n",
    "        'max_bin': 127, #2^6,原始特征为整数，很少超过100\n",
    "        #'subsample': 0.8,\n",
    "        #'bagging_freq': 1,\n",
    "        #'colsample_bytree': 0.7,\n",
    "        'num_class':9\n",
    "        \n",
    "        }\n",
    "lgbm_c = LGBMClassifier(silent=False,**params)\n",
    "\n",
    "colsample_bytree_s = [i/10.0 for i in range(5,10)]#0.5,0.6,0.7,0.8,0.9\n",
    "tuned_params = dict(colsample_bytree=colsample_bytree_s)\n",
    "\n",
    "grid_search = GridSearchCV(lgbm_c,n_jobs=4,param_grid=tuned_params,cv=kfold,scoring='neg_log_loss',verbose=5,refit=False)\n",
    "grid_search.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best score: 0.4881403108235829\n",
      "best params: {'colsample_bytree': 0.7}\n"
     ]
    }
   ],
   "source": [
    "print('best score:',-grid_search.best_score_)\n",
    "print('best params:',grid_search.best_params_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAD8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RLnjXSBVVa8A/on33lKBrutGXQAp6h2FOQP4g4j0aMS6wvCe5hmF95PoX0SkbYDrulEXuLu/qkwDFqlqxUWsW1t1qQvc3V/TgVdVNQm4DnhdvHd+cHt/XaiuArz7axBwPzBPRC6hfgRS14PASBHZAIwE9gHlAa5bK805KGoaUY6qHlHVs87kS3jvcBvQui7Vharud37uBpYDgxqrLqfNO6pa5pwC2In3D7Sr+6uautzeX1Wm8c3TO27vrwvV5fb+uhNY6Lz/50AU3vsYub2//NblnAo74sxfh7dP4bLGqktV96vqjU5Q/ZszryjAbaqdhuiICYYH3k+Zu/EeWld1Bl1+XpvOPs+nAGv0686gPXg7gto5z+OCoK52eG/bDt7/QLuopqOyAeoaD7zm8/55eAdFur2/LlSXq/vLadcL2IszZikYfr+qqcvt368PgDuc533w/nET4HK+2Zm9m/rrzK5LXQlVdeDtdN7XyL/38UCI8/w3wBMN9ftV5w0K5gfew8Qv8Sb9vznznsB7ixGA3wLbnH+EZUBvn3X/BW+nWQ7wo2CoC+/9sLY487cAdzZyXQI8C3zhvP+0INlffutye385048D/+1nXdf214Xqcnt/4e2cXeW8/0bgez7r/puz3k5gQjDUhbd/oOr/6XrghkauayreMP8S+AtOyDfE75eNzDbGGFOt5txHYYwxph5YUBhjjKmWBYUxxphqWVAYY4yplgWFMcaYallQGGOMqZYFhTHGmGpZUBhjjKnW/wcsCx7/xsbW1AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "test_means = grid_search.cv_results_[ 'mean_test_score' ]\n",
    "plt.plot(colsample_bytree_s, -test_means)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "colsample_bytree=0.7"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.6、减小学习率，调整n_estimators"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "best_n_estimators: 3659\n",
      "best cv score: 0.47292397220150845\n"
     ]
    }
   ],
   "source": [
    "params = {\n",
    "        'boosting_type': 'goss',\n",
    "        'objective': 'multiclass',\n",
    "        'n_jobs': 30,\n",
    "        'learning_rate': 0.01,\n",
    "        #'n_estimators': n_estimators_1,\n",
    "        'max_depth': 6,\n",
    "        'num_leaves': 50,\n",
    "        'min_child_samples':30,\n",
    "        'max_bin': 127, #2^6,原始特征为整数，很少超过100\n",
    "        #'subsample': 0.8,\n",
    "        #'bagging_freq': 1,\n",
    "        'colsample_bytree': 0.7,\n",
    "        #'num_class':9\n",
    "        }\n",
    "n_estimators_2 = get_n_estimators(params,X_train,y_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.7、用所有数据，采用最佳参数进行训练"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LGBMClassifier(boosting_type='goss', class_weight=None, colsample_bytree=0.7,\n",
       "        importance_type='split', learning_rate=0.01, max_bin=127,\n",
       "        max_depth=6, min_child_samples=30, min_child_weight=0.001,\n",
       "        min_split_gain=0.0, n_estimators=3659, n_jobs=30, num_class=9,\n",
       "        num_leaves=50, objective='multiclass', random_state=None,\n",
       "        reg_alpha=0.0, reg_lambda=0.0, silent=False, subsample=1.0,\n",
       "        subsample_for_bin=200000, subsample_freq=0)"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "params = {\n",
    "        'boosting_type': 'goss',\n",
    "        'objective': 'multiclass',\n",
    "        'n_jobs': 30,\n",
    "        'learning_rate': 0.01,\n",
    "        'n_estimators': n_estimators_2,\n",
    "        'max_depth': 6,\n",
    "        'num_leaves': 50,\n",
    "        'min_child_samples':30,\n",
    "        'max_bin': 127, #2^6,原始特征为整数，很少超过100\n",
    "        #'subsample': 0.8,\n",
    "        #'bagging_freq': 1,\n",
    "        'colsample_bytree': 0.7,\n",
    "        'num_class':9\n",
    "        }\n",
    "lgbm_c = LGBMClassifier(silent=False, **params)\n",
    "lgbm_c.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.8、保存模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pickle\n",
    "pickle.dump(lgbm_c,open('Otto_LightGBM_org_tfidf_goss.pkl', 'wb'))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "4.9、特征重要性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.DataFrame({'columns':list(feat_names),'importance':list(lgbm_c.feature_importances_.T)})\n",
    "df = df.sort_values(by=['importance'],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>columns</th>\n",
       "      <th>importance</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>159</th>\n",
       "      <td>feat_67_tfidf</td>\n",
       "      <td>25773</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>116</th>\n",
       "      <td>feat_24_tfidf</td>\n",
       "      <td>24254</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117</th>\n",
       "      <td>feat_25_tfidf</td>\n",
       "      <td>24169</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>140</th>\n",
       "      <td>feat_48_tfidf</td>\n",
       "      <td>23250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>132</th>\n",
       "      <td>feat_40_tfidf</td>\n",
       "      <td>20667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>178</th>\n",
       "      <td>feat_86_tfidf</td>\n",
       "      <td>19321</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>106</th>\n",
       "      <td>feat_14_tfidf</td>\n",
       "      <td>17467</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>154</th>\n",
       "      <td>feat_62_tfidf</td>\n",
       "      <td>16254</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>126</th>\n",
       "      <td>feat_34_tfidf</td>\n",
       "      <td>15218</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>108</th>\n",
       "      <td>feat_16_tfidf</td>\n",
       "      <td>15161</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>134</th>\n",
       "      <td>feat_42_tfidf</td>\n",
       "      <td>14654</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>125</th>\n",
       "      <td>feat_33_tfidf</td>\n",
       "      <td>14435</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>156</th>\n",
       "      <td>feat_64_tfidf</td>\n",
       "      <td>13780</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107</th>\n",
       "      <td>feat_15_tfidf</td>\n",
       "      <td>12830</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>180</th>\n",
       "      <td>feat_88_tfidf</td>\n",
       "      <td>12624</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>146</th>\n",
       "      <td>feat_54_tfidf</td>\n",
       "      <td>12319</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>feat_67</td>\n",
       "      <td>11785</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>feat_8_tfidf</td>\n",
       "      <td>11749</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>152</th>\n",
       "      <td>feat_60_tfidf</td>\n",
       "      <td>11270</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>162</th>\n",
       "      <td>feat_70_tfidf</td>\n",
       "      <td>11218</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>124</th>\n",
       "      <td>feat_32_tfidf</td>\n",
       "      <td>10319</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>164</th>\n",
       "      <td>feat_72_tfidf</td>\n",
       "      <td>10311</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>feat_24</td>\n",
       "      <td>10205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>135</th>\n",
       "      <td>feat_43_tfidf</td>\n",
       "      <td>10188</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>163</th>\n",
       "      <td>feat_71_tfidf</td>\n",
       "      <td>9890</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>128</th>\n",
       "      <td>feat_36_tfidf</td>\n",
       "      <td>9640</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>114</th>\n",
       "      <td>feat_22_tfidf</td>\n",
       "      <td>9540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>184</th>\n",
       "      <td>feat_92_tfidf</td>\n",
       "      <td>9034</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>158</th>\n",
       "      <td>feat_66_tfidf</td>\n",
       "      <td>8760</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>feat_48</td>\n",
       "      <td>8710</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>153</th>\n",
       "      <td>feat_61_tfidf</td>\n",
       "      <td>1105</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>feat_65</td>\n",
       "      <td>1080</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>feat_30</td>\n",
       "      <td>1051</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>176</th>\n",
       "      <td>feat_84_tfidf</td>\n",
       "      <td>1036</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>feat_6_tfidf</td>\n",
       "      <td>945</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>feat_27</td>\n",
       "      <td>934</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>feat_21</td>\n",
       "      <td>930</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>feat_3</td>\n",
       "      <td>919</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>feat_52</td>\n",
       "      <td>839</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>feat_19</td>\n",
       "      <td>830</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>feat_23</td>\n",
       "      <td>821</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>feat_49</td>\n",
       "      <td>805</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>feat_7</td>\n",
       "      <td>789</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>feat_63</td>\n",
       "      <td>754</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>feat_46</td>\n",
       "      <td>739</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>143</th>\n",
       "      <td>feat_51_tfidf</td>\n",
       "      <td>704</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>feat_45</td>\n",
       "      <td>688</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>feat_12</td>\n",
       "      <td>675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>feat_2</td>\n",
       "      <td>591</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>feat_28</td>\n",
       "      <td>554</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>feat_31</td>\n",
       "      <td>544</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>feat_77</td>\n",
       "      <td>532</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>feat_61</td>\n",
       "      <td>523</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>feat_93</td>\n",
       "      <td>508</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>feat_5</td>\n",
       "      <td>482</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>feat_81</td>\n",
       "      <td>447</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>81</th>\n",
       "      <td>feat_82</td>\n",
       "      <td>252</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83</th>\n",
       "      <td>feat_84</td>\n",
       "      <td>235</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>feat_51</td>\n",
       "      <td>162</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>feat_6</td>\n",
       "      <td>160</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>186 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           columns  importance\n",
       "159  feat_67_tfidf       25773\n",
       "116  feat_24_tfidf       24254\n",
       "117  feat_25_tfidf       24169\n",
       "140  feat_48_tfidf       23250\n",
       "132  feat_40_tfidf       20667\n",
       "178  feat_86_tfidf       19321\n",
       "106  feat_14_tfidf       17467\n",
       "154  feat_62_tfidf       16254\n",
       "126  feat_34_tfidf       15218\n",
       "108  feat_16_tfidf       15161\n",
       "134  feat_42_tfidf       14654\n",
       "125  feat_33_tfidf       14435\n",
       "156  feat_64_tfidf       13780\n",
       "107  feat_15_tfidf       12830\n",
       "180  feat_88_tfidf       12624\n",
       "146  feat_54_tfidf       12319\n",
       "66         feat_67       11785\n",
       "100   feat_8_tfidf       11749\n",
       "152  feat_60_tfidf       11270\n",
       "162  feat_70_tfidf       11218\n",
       "124  feat_32_tfidf       10319\n",
       "164  feat_72_tfidf       10311\n",
       "23         feat_24       10205\n",
       "135  feat_43_tfidf       10188\n",
       "163  feat_71_tfidf        9890\n",
       "128  feat_36_tfidf        9640\n",
       "114  feat_22_tfidf        9540\n",
       "184  feat_92_tfidf        9034\n",
       "158  feat_66_tfidf        8760\n",
       "47         feat_48        8710\n",
       "..             ...         ...\n",
       "153  feat_61_tfidf        1105\n",
       "64         feat_65        1080\n",
       "29         feat_30        1051\n",
       "176  feat_84_tfidf        1036\n",
       "98    feat_6_tfidf         945\n",
       "26         feat_27         934\n",
       "20         feat_21         930\n",
       "2           feat_3         919\n",
       "51         feat_52         839\n",
       "18         feat_19         830\n",
       "22         feat_23         821\n",
       "48         feat_49         805\n",
       "6           feat_7         789\n",
       "62         feat_63         754\n",
       "45         feat_46         739\n",
       "143  feat_51_tfidf         704\n",
       "44         feat_45         688\n",
       "11         feat_12         675\n",
       "1           feat_2         591\n",
       "27         feat_28         554\n",
       "30         feat_31         544\n",
       "76         feat_77         532\n",
       "60         feat_61         523\n",
       "92         feat_93         508\n",
       "4           feat_5         482\n",
       "80         feat_81         447\n",
       "81         feat_82         252\n",
       "83         feat_84         235\n",
       "50         feat_51         162\n",
       "5           feat_6         160\n",
       "\n",
       "[186 rows x 2 columns]"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAD8CAYAAACcjGjIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAFIRJREFUeJzt3X/sXXd93/Hnaw5BW4HFISaKkqwOyENNKy2kVrDEirqyJk621WErU6KJWF0md50zgdZJmCItCIoEm6BaJJoqFAtnogRWQLEWs2BF0VAlEuIEk8RNU5uQNiZebHAKkZhgoe/9cT/f7sbnfn/4+/36e8793udDurr3vr/n3O/7nHvued3z496bqkKSpHF/q+8GJEnDYzhIkjoMB0lSh+EgSeowHCRJHYaDJKnDcJAkdRgOkqQOw0GS1HFe3w0s10UXXVSbN2/uuw1JmiqPPvro96pq02LDTW04bN68mUOHDvXdhiRNlSR/sZTh3K0kSeowHCRJHYaDJKnDcJAkdRgOkqQOw0GS1GE4SJI6DAdJUofhIEnqMBwkzbTNe+5j8577+m5jcAwHSVLHouGQ5PIkDyZ5KsmRJO9p9Q8m+W6Sw+1yw9g4709yLMnTSa4bq29vtWNJ9ozVr0jycJKjST6f5PzVnlBJ0tItZcvhZeC3q+rngG3A7iRXtr/9XlVd1S4HANrfbgJ+HtgO/H6SDUk2AJ8ErgeuBG4ee5yPtcfaArwI3LpK0ydJWoZFw6GqTlTVY+32S8BTwKULjLIDuKeqflxV3wGOAde0y7GqeqaqfgLcA+xIEuB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Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.bar(range(len(lgbm_c.feature_importances_)),lgbm_c.feature_importances_)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
